import numpy as np
import cv2
import scipy
from scipy.fftpack import dct
from scipy.fftpack import idct

print(" np.__version__:", np.__version__)
print(" cv2.__version__:", cv2.__version__)
print(" scipy.__version__:", scipy.__version__)
#image = np.arange(1, 65).reshape(8, 8)
image = np.arange(1, 65).reshape(8, 8)
image_f = np.float32(image)
#print("original picture data:\n", image)
print("original picture data:\n", image_f)


dct_array = cv2.dct(image_f)
print("cv2 dct(,) result:\n", dct_array)

idct_array = cv2.idct(dct_array)
print(" image_f.shape[-1]:", image_f.shape[-1])

print("cv2 idct(,) np.ceil() result:\n", np.ceil(idct_array))

